- return if !Gitlab.com?
- credit_card_validation = user.credit_card_validation
= render Pajamas::CardComponent.new(body_options: { class: 'gl-py-0'}) do |c|
  - c.with_header do
    = _('Credit card:')
    - if local_assigns[:link_to_match_page] && credit_card_validation&.holder_name
      .gl-float-right.small
        = link_to card_match_admin_user_path(@user) do
          = _('View card matches')
  - c.with_body do
    %ul.content-list
      %li#credit-card-status
        - if credit_card_validation.nil?
          %span.light= _('Validated:')
          %strong= _('No')
        - else
          %span.light= _('Validated at:')
          %strong
            = credit_card_validation.credit_card_validated_at.to_s(:medium)

      - if credit_card_validation&.holder_name
        %li
          %span.light= _('Holder name:')
          %strong
            = credit_card_validation.holder_name

      - if credit_card_validation&.network
        %li
          %span.light= _('Network:')
          %strong
            = credit_card_validation.network.camelcase

      - if credit_card_validation&.last_digits
        %li
          %span.light= _('Card number:')
          %strong
            = credit_card_validation.last_digits.to_s.rjust(4, '0')

      - if credit_card_validation&.expiration_date
        %li
          %span.light= _('Expiration date:')
          %strong
            = credit_card_validation.expiration_date
